package com.example.m1;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Producer {
    @Autowired
    private AmqpTemplate amqpTemplate;
    public void send(){


            System.out.println("enter:");
            String s="hi";
            amqpTemplate.convertAndSend("helloworld",s);

    }
}
